<?php

/**
 * @file readonlybox.php
 * @brief Clase para generar un readonlybox
 * @author DyrTechnologies
 * @version V 1.0
 * @date Wed Oct 03 2007
 *
 *  Part of the CEFIRO dynamic web framework project
 *
 *  Copyright (C) 2007  Dyr technologies http://dyrtech.com.ve
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

/**
 * @class Clase readonlybox
 */

require_once(CEF_TEXTBOX);

$readonlybox_instance = 0;

class readonlybox extends textbox {

	/**
	 * @brief Constructor por omision y parametrico de la clase aprovechamos el hecho de que cada atributo tiene un valor por omision predefinido para no rehacer el constructor
	 *
	 * @param string $_name
	 * @param string $_label
	 * @param string $_value
	 * @param input_opt $_opt
	 * @param string $_dom
	 * @return readonlybox La instancia de la clase
	 */

	public function readonlybox($_name='__readonlybox', $_label='', $_value='', $_opt = '', $_dom = ''){

		/**
		 * @brief El nombre del widget es el tipo con el numero de la instancia que representa o el nombre pasado por omision en caso contrario
		 */
		if($_name === "__readonlybox"){
  		/**
  		 * @brief $readonlybox_instance es una variable para incrementar el numero de readonlyboxes existentes
  		 */
  		global $readonlybox_instance;
  		$_name = "readonlybox".$readonlybox_instance++;
		}
		$this->textbox($_name,$_label,$_value,true,$_opt,$_dom);
  }

	/**
	 * @brief Asigna el readonlybox a la variable $smarty para su renderizacion
	 *
	 */
	public function display_readonlybox(){
		$this->display_textbox();
	}
}

  ?>